<template>
  <div>
    <el-row>
      <el-col>
        <div id="splashes2" :style="{width: '100%', height: '400px'}"></div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    data() {
      return {

      }
    },
    mounted() {
      this.drawLine();
    },
    methods: {
      drawLine() {
        // 基于准备好的dom，初始化echarts实例
        let splashes2 = this.$echarts.init(document.getElementById('splashes2'));
        // 绘制图表
        splashes2.setOption(
          {
            title: [{
              text: "期间：2016-12-28",
              x: '5%',
              y: 0,

            }, {
              text: "存在资不抵债风险",
              x: '70%',
              y: '5%',

            }, {
              text: "存在总体资金不足",
              x: '15%',
              y: '5%',

            }, {
              text: "存在速动资金不足",
              x: '15%',
              y: '80%',

            }, {
              text: "存在流动资金不足",
              x: '70%',
              y: '80%',

            }],
            tooltip: {
              /*返回需要的信息*/
              formatter: function(param) {
                var value = param.value;
                return '<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 16px;padding-bottom: 7px;margin-bottom: 7px;"> ' + value[7] + '(' + value[6] + ')' +
                  '</div>';
              }
            },
            xAxis: {
              splitLine: {
                show: false,
              },
              axisLabel: {
                show: false
              },
              axisTick: {
                show: false
              },
              max: 21,
              min: -21
            },
            yAxis: {
              splitLine: {
                show: false,
              },
              axisLabel: {
                show: false
              },
              axisTick: {
                show: false
              },
              max: 21,
              min: -21
            },
            series: [
              {
                name: '',
                data: [
                  [-10,
                    20,
                    0,
                    0.75000000000000000000,
                    0,
                    0,
                    "A000",
                    "公司一"
                  ],
                  [
                    6,
                    7,
                    -0.890000000000000,
                    0,
                    0,
                    0,
                    "Z400",
                    "公司二"
                  ],
                  [
                    19,
                    -20,
                    0,
                    0,
                    0,
                    -18.420000000000000,
                    "2000",
                    "公司三"
                  ]
                ],
                type: 'scatter',
                symbolSize: 40
              }]
          }
        );
      }
    }
  }
</script>

<style scoped>

</style>
